<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<title>完工报告信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<script language="javascript">
function doInsType(){
	if(check()){
		if(confirm("确认保存信息？")){
			document.all.operate.value = "insinfo";
			document.forms[0].submit();
		}
	}
}
 //限制添加快捷内容的字数  
var maxLength =30; 
function MaxInput(fo,len) {
	if(len!=""){
		maxLength=len;
	}
	if (fo.value.length > maxLength) {
		alert("输入内容过多！");
		fo.value = fo.value.substring(0, maxLength);
	}
}
function dosum(){
	var z = document.all["mak.rightnum"]; 
	var c = document.all["mak.errornum"];
	var s = document.all["mak.total"];
	if(doVprice(z)&&doVprice(c)){
		s.value = round(((z.value-0) + (c.value-0)),2);
	}
}
</script>
</head>
<body >
<form name="form1" method="post" action="<%=path %>/dailypaper.action">
<script type="text/javascript">
if('${msg}'=='true'){
	_alert('保存成功');
	doclose();
	parent.document.all.operate.value = "start";
	parent.document.forms[0].submit();
}else if('${msg}'=='false'){
	_alert('保存失败');
}
</script>
<table width="100%" height="99%" border="0" cellpadding="0" cellspacing="0" >
    <tr>
      <td class="MainBody_body" style="padding:10 20px 0 0;"><input name="operate" type="hidden" value=""/>
      <div align="right" style="padding: 0 10 10 0;">
      	 <input type="button" class="btn" value="保 存" onclick="doInsType()"/>&nbsp;&nbsp;
		 <input type="button" class="btn" value="关 闭" onclick="doclose()"/>&nbsp;&nbsp;</div>
		 <input name="mak.taskid" type="hidden" value="${taskinfo.taskid }" />
      <table  border="0" cellpadding="0" cellspacing="0" class="MainBody_table">
            <tr>
              <td  colspan="6" class="bg_title">生产单完工报告</td>
            </tr>
            <tr>
              <th width="18%" nowrap="nowrap">生产单名称</th>
              <td width="32%" ><input name="taskname" type="text" value="${taskinfo.taskname }" class="readinput" readonly/></td>
              <th width="18%" nowrap="nowrap">生产人</th> 
              <td width="32%" ><input name="" type="text" value="${taskinfo.createuser }" class="readinput" readonly/></td>
            </tr>
            <tr>
              <th nowrap="nowrap">开始时间</th> 
              <td><input name="mak.starttime" type="text" value="${taskinfo.createtime }" class="readinput" readonly/></td>
              <th nowrap="nowrap">完成时间</th>
              <td><input name="mak.endtime" type="text" value="${taskinfo.finishtime }" class="readinput" readonly/></td>
              </tr>
            <tr>
         	  <th nowrap="nowrap">正品数量</th>
              <td ><input name="mak.rightnum" type="text" value="0" check="checkInt" title="正品数量" maxlength="30" onblur="dosum()" class="notnull"/></td>
              <th nowrap="nowrap" >次品数量</th> 
              <td ><input name="mak.errornum" type="text" value="0" check="checkInt" title="次品数量" maxlength="30" onblur="dosum()" class="notnull"/></td>
              </tr>
            <tr>
              <th nowrap="nowrap" >合计数量</th> 
              <td ><input name="mak.total" value="" class="readinput" readonly/></td>
              <th nowrap="nowrap">填报人</th>
              <td><select name="mak.filluser" style="width: 98%">
                <c:forEach var="person" varStatus="status" items="${personlist}">
				<option value="${person.personname }" <c:if test="${sessionScope.admin_user.personname==person.personname}">selected</c:if>>${person.personname }</option>
				</c:forEach></select></td>
            </tr>
            <tr>
              <th align="center" nowrap="nowrap" >备注信息</th> 
              <td colspan="5"><textarea name="mak.remark" style="width: 100%;" rows="6" onblur="MaxInput(this,100)"></textarea></td>
            </tr>
		</table>
      </td>
  </tr>
</table>
<script type="text/javascript">
doDate("mak.endtime");
</script>
</form>
</body>
</html>
